﻿
CREATE proc thuan_qtdanhmucnhomnguoidungsua    
@ID int,    
@DienGiai nvarchar(255)  ,
@DoUuTien int  
as    
if exists(select * from DanhMuc_NhomNguoiDung   Where MaNhomUser<>@ID and TenNhomUser=@DienGiai)    
begin    
select ErrCode=0    
end    
else    
begin    
update DanhMuc_NhomNguoiDung   set TenNhomUser=@DienGiai,DoUuTien=@DoUuTien WHere MaNhomUser=@ID    
select ErrCode=1    
end